<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>得到一个两数之间的随机整数，包括两个数在内</title>
  </head>

  <body>

  </body>
  <script>
    function getRandom(max, min) {
      return Math.floor(Math.random() * (max - min + 1)) + min;
    }
    console.log(getRandom(0, 10));
  </script>

</html>